﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using System.Collections;
using SaleStat.COM.SQLHelper;
using SaleStat.COM.Constant;
using SaleStat.COM.Exceptions;
using SES.COM.SQLHelper;
namespace SaleStat.BLL.PM
{
   public class PM_List_BLL
    {
        #region 全局定义
        /// <summary>
        /// XML文件名
        /// </summary>
        private string _XML_NAME = "PM";
        #endregion

        #region 取得产品信息
        /// <summary>
        /// 取得产品信息
        /// </summary>
        /// <param name="arrParm"></param>
        /// <returns></returns>
        public DataTable getCustomerInfo(ArrayList arrParam)
        {


            DataTable dtCutomerInfo = DbHelper.ExecuteDataTable(_XML_NAME, SqlKeyConstant.PM_SQL001_R, arrParam);
            //返回产品信息
            return dtCutomerInfo;
        }
        #endregion

        #region 删除产品信息
        /// <summary>
        /// 删除产品信息
        /// </summary>
        /// <param name="strCustomerID">产品编码</param>
        /// <returns></returns>
        public Boolean deleteCustomInfo(string strCustomerID, string strRowVersion)
        {
            ArrayList arrParam = new ArrayList();
            arrParam.Add(strCustomerID);
            arrParam.Add(strRowVersion);
            int intResult = DbHelper.ExecuteNonQuery(_XML_NAME, SqlKeyConstant.PM_SQL002_D, arrParam);
            if (intResult <= 0)
            {
                throw new BusinessException("删除失败");

            }
            return true;
        }
        #endregion
    }
}
